package com.chaosj.skill.guava.basic

import com.google.common.base.Splitter

/**
 * @Description:
 * @author: caoyangjie
 * @date: 2019年11月2019/11/26日 17:31
 * @Copyright: © 赢时胜
 */
class GuavaSplitter {
    static void main(args){
        def val = "1=2,2=4,4=8,8=16"
        println(Splitter.on(",").withKeyValueSeparator("=").split(val))
        val = "1,2,3,4,5,6,,8"
        println(Splitter.on(",").splitToList(val))
    }
}
